package cheme.ProcessEditor.Parts;

import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.NodeEditPart;
import org.eclipse.gef.Request;

public interface ITerminalSinkPart extends ITerminalPart
{
	/**
	 * Returns the <code>ConnectionAnchor</code> for the specified <i>target</i> connection.
	 * This NodeEditPart is the {@link ConnectionEditPart#getTarget() target} EditPart for the
	 * given connection.
	 * <P>
	 * The anchor may be a function of the connection's model, the node's model, a
	 * combination of both, or it may not depend on anything all.
	 * @param connection the ConnectionEditPart
	 * @return the ConnectionAnchor for the given ConnectionEditPart
	 */
	ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection);

	/**
	 * Returns the <i>target</i> <code>ConnectionAnchor</code> for the specified Request. The
	 * returned ConnectionAnchor is used only when displaying <i>feedback</i>. The Request
	 * is usually a {@link org.eclipse.gef.requests.LocationRequest}, which provides the
	 * current mouse location.
	 * @param request a Request describing the current interaction
	 * @return the ConnectionAnchor to use during feedback
	 */
	ConnectionAnchor getTargetConnectionAnchor(Request request);
}